frappe.ui.form.on('Purchase Order Item', {
	fg_item(frm, cdt, cdn) {
	    let row = locals[cdt][cdn];
	    frappe.db.get_value("Item", row.fg_item, "service_item"
	        ).then((r)=>{
	            let item_code = r.message && r.message.service_item || "";
	            frappe.model.set_value(cdt, cdn,  "item_code", item_code);
	        })
	}
})